package cn.nawang.ebeim.api.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @ClassName: BackStrategy
 * @Description: TODO
 * @author fanyb
 * @date Aug 24, 2015 5:08:41 PM
 * @version v1.0
 */
@Entity
@Table(name = "backup_strategy", catalog = "ebeim")
public class BackStrategy {
  private String bsId;
  private String datasourceId;
  private String type;
  private Long backupTime;
  private Integer backupTimeStatus;
  private Integer backupCycle;
  private String backupPeriod;

  @Id
  @Column(name = "id", unique = true, nullable = false, length = 45)
  public String getBsId() {
    return bsId;
  }

  public void setBsId(String bsId) {
    this.bsId = bsId;
  }
  
  @Column(name = "backup_time_status")
  public Integer getBackupTimeStatus() {
    return backupTimeStatus;
  }

  public void setBackupTimeStatus(Integer backupTimeStatus) {
    this.backupTimeStatus = backupTimeStatus;
  }

  @Column(name = "datasource_id")
  public String getDatasourceId() {
    return datasourceId;
  }

  public void setDatasourceId(String datasourceId) {
    this.datasourceId = datasourceId;
  }

  @Column(name = "type")
  public String getType() {
    return type;
  }
  
  public void setType(String type) {
    this.type = type;
  }

  @Column(name = "backup_time")
  public Long getBackupTime() {
    return backupTime;
  }

  public void setBackupTime(Long backupTime) {
    this.backupTime = backupTime;
  }

  @Column(name = "backup_period")
  public String getBackupPeriod() {
    return backupPeriod;
  }

  public void setBackupPeriod(String backupPeriod) {
    this.backupPeriod = backupPeriod;
  }
  
  @Column(name = "backup_cycle")
  public Integer getBackupCycle() {
    return backupCycle;
  }

  public void setBackupCycle(Integer backupCycle) {
    this.backupCycle = backupCycle;
  }

  @Override
  public String toString() {
    return "BackStrategy [bsId=" + bsId + ", datasourceId=" + datasourceId + ", type=" + type
        + ", backupTime=" + backupTime + ", backupTimeStatus=" + backupTimeStatus + ", backupCycle="
        + backupCycle + ", backupPeriod=" + backupPeriod + "]";
  }
}
